<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/common/includes.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>zzzzzz - Settings</title>
<%@ include file="/WEB-INF/common/meta.jsp"%>
<%@ include file="/WEB-INF/common/global_res.jsp"%>
<script type="text/javascript" src="${ctx}/res/jquery/validate/jquery.validate.min.js"></script>
<script type="text/javascript" src="${ctx}/res/jquery/validate/messages_zh_CN.js"></script>
<script type="text/javascript">
	$(function() {
		$('#editPasswordForm').validate(
				{
					rules : {
						curPassword : {
							minlength : 6,
							required : true
						},
						newPassword : {
							minlength : 6,
							required : true
						},
						confirmNewPassword : {
							minlength : 6,
							required : true
						}
					},
					highlight : function(label) {
						$(label).closest('.control-group').addClass('error');
					},
					success : function(label) {
						label.text('OK!').addClass('valid').closest(
								'.control-group').addClass('success');
					}
				});
	});
</script>
</head>
<body>

	<%@ include file="/WEB-INF/common/header.jsp"%>

	<div class="container">
		<div id="settings" class="row">
		<div class="span1">&nbsp;</div>
			<div class="span10">
				<div class="tabbable tabs-left">
					<%@ include file="menu.jsp"%>
					<div class="tab-content">
						<div class="row-fluid">
						<div class="span8">
							<c:if test="${not empty message}">
								<div class="${message.type.cssClass}">${message.text}</div>
							</c:if>
							<form:form id="editPasswordForm" action="${ctx}/account/settings/password" method="post" modelAttribute="editPasswordForm" class="form-horizontal">
								<fieldset>
									<legend><small>修改密码</small></legend>
									<div class="control-group">
										<form:label path="curPassword" class="control-label">密码</form:label>
										<div class="controls">
											<form:password path="curPassword" cssClass="input-large" placeholder="请输入密码" />
											<form:errors path="curPassword" cssClass="text-error" />
										</div>
									</div>
									<div class="control-group">
										<form:label path="newPassword" class="control-label">新密码</form:label>
										<div class="controls">
											<form:password path="newPassword" cssClass="input-large" placeholder="请输入新密码" />
											<form:errors path="newPassword" cssClass="text-error" />
										</div>
									</div>
									<div class="control-group">
										<form:label path="confirmNewPassword" class="control-label">新密码确认</form:label>
										<div class="controls">
											<form:password path="confirmNewPassword" cssClass="input-large" placeholder="请再次输入新密码" />
											<form:errors path="confirmNewPassword" cssClass="text-error" />
										</div>
									</div>
									<div class="control-group">
										<div class="controls">
											<button type="submit" class="btn">保存</button>
										</div>
									</div>
								</fieldset>
							</form:form>
						</div>
						<div class="span4 well" style="margin-top: 20px;">
							<p>密码最少需要6位数，请提高密码的复杂度，以确保您的帐户安全。</p>
						</div>
						</div>
					</div>
				</div>
			</div>
			<div class="span1">&nbsp;</div>
		</div>
	</div>

	<script type="text/javascript">
		
	</script>

	<%@ include file="/WEB-INF/common/footer.jsp"%>

</body>
</html>